package com.example.shopping.mapper;

import com.example.shopping.dto.CartItem;
import com.example.shopping.entity.Cart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CartMapper {


    List<CartItem>  findCarByUserId(int userid);

    Cart findCarByGoodId(int userid, int goodid);

    void updateCar(Cart cart);

    int insert(Cart cart);

    int deleteById(Integer itemId);

    Cart findById(Long itemId);

    int updateCarQuantity(Long itemId, Integer quantity);
}
